<?php

use App\Http\Controllers\Client\ClientController;
use App\Http\Controllers\NewContract\ContractController;
use Illuminate\Support\Facades\Route;

/* 映射 excel 文件列头到数据库表字段
 *
 *
 * by BREEZEER	: 2023/4/20
 *
 *
 *
 */
Route::any('import/lawCaseTableFieldList'															,[\App\Http\Controllers\Import\mapExcelFileColumnHeaderToDatabaseTableFieldController::class	,	'lawCaseTableFieldList'											]);
Route::any('import/mapExcelFileColumnHeaderToDatabaseTableField/{clientID}'							,[\App\Http\Controllers\Import\mapExcelFileColumnHeaderToDatabaseTableFieldController::class	,	'mapExcelFileColumnHeaderToDatabaseTableField'					]);
Route::any('import/getMapRelationBetweenExcelFileColumnHeaderAndDatabaseField/{clientID}'			,[\App\Http\Controllers\Import\mapExcelFileColumnHeaderToDatabaseTableFieldController::class	,	'getMapRelationBetweenExcelFileColumnHeaderAndDatabaseField'	]);


/* 映射公司 id 到数据库配置 redis 配置等系统固有的必须依赖的默认参数
 *
 *
 *
 * by BREEZEER : 2023/4/19
 *
 *
 *
 */
Route::any('company.x/map_company_to_database_config'												,[\App\Http\Controllers\Company\cMapCompanyToDatabaseConfigurationController::class				,	'mapCompanyToDatabaseConfig'					]);


/* 权限和角色
 *
 * by BREEZEER
 * 2022.05.23
 *
 *
 *
 */
Route::any('staffPermission/role'																	,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'createRoleName'								]);
Route::any('staffPermission/revokeRole/{role_id}'													,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'revokeRoleName'								]);
Route::any('staffPermission/renameRole/{role_id}'													,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'renameRoleName'								]);
Route::any('staffPermission/staffOwnAllRoleAndPermission/{staff_id}'								,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'getStaffOwnAllRoleAndPermission'				]);
Route::any('staffPermission/staffOwnAllNavigationMenu/{staff_id}'									,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'getstaffOwnAllNavigationMenu'					]);
Route::any('staffPermission/allNavigationMenu'														,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'getallNavigationMenu'							]);
Route::any('staffPermission/allPermissionItem'														,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'getallPermissionItem'							]);
Route::any('staffPermission/allRole'																,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'getallRole'									]);
Route::any('staffPermission/permissionToRole/{role_id}'												,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'addpermissionToRole'							]);
Route::any('staffPermission/roleIncludedAllPermission/{role_id}'									,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'getroleIncludedAllPermission'					]);
Route::any('staffPermission/revokePermissionFromRole/{role_id}'										,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'revokePermissionFromRole'						]);
Route::any('staffPermission/roleToStaff/{staff_id}'													,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'addroleToStaff'								]);
Route::any('staffPermission/revokeRoleFromStaff/{staff_id}'											,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'revokeRoleFromStaff'							]);
Route::any('staffPermission/navigationMenuItem'														,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'addnavigationMenuItem'							]);
Route::any('staffPermission/revokeNavigationMenuItem/{menu_id}'										,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'revokeNavigationMenuItem'						]);
Route::any('staffPermission/onePermissionItem'														,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'addonePermissionItem'							]);
Route::any('staffPermission/revokePermissionItem/{permission_id}'									,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'revokePermissionItem'							]);
Route::any('staffPermission/staffOwnAllRole/{staff_id}'												,[\App\Http\Controllers\staffPermission\cStaffPermissionController::class           ,	'getstaffOwnAllRole'							]);


/* 快速搜索
 *
 * by BREEZEER
 * 2022.05.12
 *
 *
 *
 */
Route::any('quickSearch/{search_type}'																,[\App\Http\Controllers\quickSearch\controllerQuickSearch::class					,	'quickSearch'									]);

/* 招标采购
 *
 * by BREEZEER
 * 2022.04.26
 *
 *
 *
 */
Route::any('apply_tender_purchase/{dispatch_cmd_id}'												,[\App\Http\Controllers\tender_purchase::class										,	'ini'											]);
Route::any('tenderBidding'																			,[\App\Http\Controllers\tender_purchase::class										,	'tenderBiddingCreate'							]);
Route::any('tenderBiddingSupplierInformation'														,[\App\Http\Controllers\tender_purchase::class										,	'tenderBiddingSupplierInformationCreate'		]);

/* 信用项目管理
 *
 * by breezeer
 * 2022.04.29
 *
 *
 *
 */
Route::any('creditProjectAdd'																		,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditProjectAdd'								]);
Route::any('creditProjectModify/{credit_project_id}'												,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditProjectModify'							]);
Route::any('creditDetail/{credit_project_id}'														,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditProjectGetDetail'						]);
Route::any('createCreditProjectSN'																	,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'createCreditProjectSN'							]);
Route::any('creditProjectConfirm/{client_id}/{department_id}'										,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditProjectConfirm'							]);
Route::any('creditProjectList'																		,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditProjectList'								]);
Route::any('creditProjectAddFinanceInformation/{credit_project_id}'									,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditProjectAddFinanceInformation'			]);
Route::any('creditProjectModifyFinanceInformation/{credit_project_id}'								,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditProjectModifyFinanceInformation'			]);
Route::any('creditProjectGetFinanceInformation/{credit_project_id}'									,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditProjectGetFinanceInformation'			]);
Route::any('CreditProjectDelete/{credit_project_id}'												,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'CreditProjectDelete'							]);
Route::any('creditDetailGetRelationDepartmentInformation/{department_id}'							,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditDetailGetRelationDepartmentInformation'	]);
Route::any('creditDetailGetRelationContractInformation/{credit_project_id}'							,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditDetailGetRelationContractInformation'	]);
Route::any('exportCreditProjectDataToExcelFile'														,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'exportCreditProjectDataToExcelFile'	        ]);
Route::any('creditProjectAdjustCreditQuota/{credit_project_id}'										,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditProjectAdjustCreditQuota'	            ]);
Route::any('creditProjectReview/creditManagerReview/{credit_project_id}'							,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'creditManagerReview'							]);
Route::any('creditProjectReview/CreditFinanceManagerReview/{credit_project_id}'						,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'CreditFinanceManagerReview'					]);
Route::any('creditProjectReview/CreditDepartmentLeaderReview/{credit_project_id}'					,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'CreditDepartmentLeaderReview'					]);
Route::any('creditProjectReview/CreditAmountAdjustReview/{credit_project_id}'						,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'CreditAmountAdjustReview'						]);
Route::any('creditProjectReview/departmentLeaderFirstReview/{credit_project_id}'					,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'departmentLeaderFirstReview'					]);
Route::any('creditProjectReview/departmentLeaderFirstReviewStart/{credit_project_id}'				,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'departmentLeaderFirstReviewStart'				]);
Route::any('creditProjectReview/departmentCreditManagerReview/{credit_project_id}'					,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'departmentCreditManagerReview'					]);
Route::any('creditProjectReview/departmentFinanceManagerReview/{credit_project_id}'					,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'departmentFinanceManagerReview'				]);
Route::any('creditProjectReview/adjustCreditProjectQuotaReview/{credit_project_id}/{review_step}'	,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'adjustCreditProjectQuotaReview'				]);
Route::any('creditProjectReview/rollbackReviewRequest/{credit_project_id}/{review_type}'			,[\App\Http\Controllers\controllerCreditProjectManage::class						,	'rollbackReviewRequest'							]);














/**
 * 验证
 */
Route::get('tocCs',[\App\Http\Controllers\Verify\VerifyController::class,'addRequestId']);

Route::post('sendDingTalkApproval',[\App\Http\Controllers\Approval\OldDingTalkApprovalController::class,'sendDingTalkApproval'])->middleware(\App\Http\Middleware\Approval\ApprovalMiddleware::class);

Route::post('userApprovalToDoNumber/{userId}',[\App\Http\Controllers\Approval\OldDingTalkApprovalController::class,'getUserApprovalToDoNumber']);
Route::get('dingTalkApprovalInfo/{processId}',[\App\Http\Controllers\Approval\OldDingTalkApprovalController::class,'getDingTalkApprovalInfo']);


/**
 * 公司路由
 */
// 测试结构
Route::any('test',[\App\Http\Controllers\Company\CompanyController::class,'test']);

Route::get('downloadCreditClientTable/{creditClientId}',[\App\Http\Controllers\Client\ClientController::class,'downloadCreditClientTable']);
// 自定义文件导出
Route::post("excelClientExport",[\App\Http\Controllers\ExportController::class,'exportClientV2']);
Route::get("exportDownload",[\App\Http\Controllers\ExportController::class,'exportDownload']);

// 上传导入文件
//Route::any('uploadImportExcel',[\App\Http\Controllers\Import\ImportController::class,'uploadExcel']);
// 导入文件
Route::post('importExcel/{clientId}',[\App\Http\Controllers\Import\ImportController::class,'uploadExcel']);

// 文件上传
Route::any('uploadFile',[\App\Http\Controllers\FileController::class,'uploadFile']);
Route::post('uploadFormatFile',[\App\Http\Controllers\FileController::class,'uploadFormatFile']);
Route::post('uploadLetterFile',[\App\Http\Controllers\FileController::class,'uploadLetterFile']);
// 文件下载
Route::get('downloadFile/{fileId}',[\App\Http\Controllers\FileController::class,'downloadFile']);
// 文件转化为pdf
Route::post('wordToPdf/{fileId}',[\App\Http\Controllers\FileController::class,'wordToPdf']);
Route::post('wordToHtml/{fileId}',[\App\Http\Controllers\FileController::class,'wordToHtml']);

// 新增公司
Route::post('company',[\App\Http\Controllers\Company\CompanyController::class,'addCompany']);
// 修改公司
Route::put('company/{companyId}',[\App\Http\Controllers\Company\CompanyController::class,'editCompany']);
// 删除公司
Route::patch('company/{companyId}',[\App\Http\Controllers\Company\CompanyController::class,'deleteCompany']);
// 批量删除
Route::patch('bulkDeleteCompany',[\App\Http\Controllers\Company\CompanyController::class,'bulkDeleteCompany']);

// 公司下拉
Route::get('companySelect',[\App\Http\Controllers\Company\CompanyController::class,'getCompanySelect']);
// 公司列表
Route::get('companyList',[\App\Http\Controllers\Company\CompanyController::class,'getCompanyList']);
// 公司详情
Route::get('company/{companyId}',[\App\Http\Controllers\Company\CompanyController::class,'getCompanyInfo']);

/**
 *  部门路由
 */
// 新增部门
Route::post('department',[\App\Http\Controllers\Department\DepartmentController::class,'addDepartment']);
// 修改部门
Route::put('department/{departmentId}',[\App\Http\Controllers\Department\DepartmentController::class,'editDepartment']);
// 删除部门
Route::patch('department/{departmentId}',[\App\Http\Controllers\Department\DepartmentController::class,'deleteDepartment']);
// 部门详情
Route::get('department/{departmentId}',[\App\Http\Controllers\Department\DepartmentController::class,'getDepartmentDetail']);
// 通过公司Id获取部门下拉
Route::get('deptSelectByCompanyId/{companyId}',[\App\Http\Controllers\Department\DepartmentController::class,'getDeptSelectByCompanyId']);
// 获取当前公司下拉
Route::get('deptSelectByCurrentCompany',[\App\Http\Controllers\Department\DepartmentController::class,'getDeptSelectByCurrentCompany']);
// 根据部门查公司
Route::get('deptCompany/{deptId}',[\App\Http\Controllers\Department\DepartmentController::class,'getDeptCompanyIdByDeptId']);

/**
 * 职位
 */
// 新增职位
Route::post('position',[\App\Http\Controllers\Position\PositionController::class,'createPosition']);
// 修改职位
Route::put('position/{positionId}',[\App\Http\Controllers\Position\PositionController::class,'editPosition']);
// 删除职位
Route::patch('position/{positionId}',[\App\Http\Controllers\Position\PositionController::class,'deletePosition']);
// 批量删除职位
Route::patch('bulkDeletePosition',[\App\Http\Controllers\Position\PositionController::class,'bulkDeletePosition']);
// 职位详情
Route::get('position/{positionId}',[\App\Http\Controllers\Position\PositionController::class,'getPositionDetail']);
// 获取职位列表
Route::get('positionList',[\App\Http\Controllers\Position\PositionController::class,'getPositionListByDepartmentId']);
// 获取职位下拉
Route::get('positionSelect',[\App\Http\Controllers\Position\PositionController::class,'getPositionSelectByDepartmentId']);
// 启用职位
//Route::patch('startPosition/{startPositionId}',[\App\Http\Controllers\Position\PositionController::class,'startPosition']);

/**
 * 员工
 */
    // 编辑员工修改密码
    Route::put('currentStaffPwd',[\App\Http\Controllers\Staff\StaffController::class,'editCurrentStaffPwd']);
    Route::put('editCurrentStaffBasic',[\App\Http\Controllers\Staff\StaffController::class,'editCurrentStaffBasic']);
    // 新增员工
    Route::post('staff',[\App\Http\Controllers\Staff\StaffController::class,'addStaff']);
    // 获取当前登录用户
    Route::get('currentStaff',[\App\Http\Controllers\Staff\StaffController::class,'getCurrentStaff']);
    // 员工列表
    Route::get('staff',[\App\Http\Controllers\Staff\StaffController::class,'getStaffList']);
    // 修改员工信息
    Route::put('staff/{staffId}',[\App\Http\Controllers\Staff\StaffController::class,'editStaffBasic']);
    // 员工详情
    Route::get('staff/{staffId}',[\App\Http\Controllers\Staff\StaffController::class,'getStaffDetail']);
    // 删除员工
    Route::patch('staff/{staffId}',[\App\Http\Controllers\Staff\StaffController::class,'deleteStaff']);
    // 用户启用
    Route::patch('startStaff/{startStaffId}',[\App\Http\Controllers\Staff\StaffController::class,'startStaff']);
    // 用户停用
    Route::patch('stopStaff/{stopStaffId}',[\App\Http\Controllers\Staff\StaffController::class,'stopStaff']);
    // 批量删除用户
    Route::patch('bulkDeleteStaff',[\App\Http\Controllers\Staff\StaffController::class,'bulkDeleteStaff']);
// 授权用户
Route::post('authorizeStaff',[\App\Http\Controllers\Staff\StaffController::class,'AuthorizeStaff']);
Route::get('authorizeDetail',[\App\Http\Controllers\Staff\StaffController::class,'AuthorizeDetail']);

/**
 * 员工登录
 */
Route::post('login',[\App\Http\Controllers\Login\LoginController::class,'login']);
Route::put('logout',[\App\Http\Controllers\Login\LoginController::class,'logout']);
// 钉钉登录
Route::get('dingTalkScanQRCodesLogin',[\App\Http\Controllers\Login\LoginController::class,'dingTalkScanQRCodesLogin']);
Route::get('loginDepartment',[\App\Http\Controllers\Login\LoginController::class,'loginDepartment']);
Route::get('companySelectByLogin',[\App\Http\Controllers\Login\LoginController::class,'getCompanySelectByLogin']);

/**
 * 员工部门关联
 */
Route::put('staff/{staffId}/staffDepartment/{staffDepartmentId}',[\App\Http\Controllers\Staff\StaffController::class,'editStaffDepartment']);
Route::patch('staff/{staffId}/staffDepartment/{staffDepartmentId}',[\App\Http\Controllers\Staff\StaffController::class,'deleteStaffDepartment']);
Route::put('staff/{staffId}/staffDepartment',[\App\Http\Controllers\Staff\StaffController::class,'addStaffDepartment']);

Route::post('role',[\App\Http\Controllers\Auth\RoleController::class,'addRole']);
Route::get('role',[\App\Http\Controllers\Auth\RoleController::class,'getRoleList']);
Route::get('role/{role_id}',[\App\Http\Controllers\Auth\RoleController::class,'getRoleInfo']);
Route::get('roleSelect',[\App\Http\Controllers\Auth\RoleController::class,'getRoleSelect']);
Route::put('role/{role_id}',[\App\Http\Controllers\Auth\RoleController::class,'editRole']);
Route::patch('role/{role_id}',[\App\Http\Controllers\Auth\RoleController::class,'deleteRole']);
Route::get('roleAuthMenu/{role_id}',[\App\Http\Controllers\Auth\RoleController::class,'getRoleAuthMenu']);
// 角色权限绑定
Route::post('roleAuth',[\App\Http\Controllers\Auth\AuthRoleController::class,'addRoleAuthsByRole']);

// 权限菜单
Route::get('authMenu',[\App\Http\Controllers\Auth\AuthMenuController::class,'getAuthMenuMenu']);

// 权限列
Route::get('authList',[\App\Http\Controllers\Auth\AuthBasicController::class,'getAuthList']);
// 钉钉
// 绑定钉钉用户
Route::get('bindDingTalk',[\App\Http\Controllers\Staff\StaffController::class,'bindDingTalk']);
// 注册回调
Route::any('registerCallBackInput',[\App\Http\Controllers\DingTalkRollBackController::class,'regiserCallBackI']);
Route::any('registerCallBackOutPut',[\App\Http\Controllers\DingTalkRollBackController::class,'triggerDingTalkRollBack']);
// 接收回调
Route::any('triggerDingTalkRollBack',[\App\Http\Controllers\DingTalkRollBackController::class,'triggerDingTalkRollBack']);
Route::any('triggerDingTalkRollBackEvent',[\App\Http\Controllers\DingTalkRollBackController::class,'triggerDingTalkRollBackEvent']);
Route::any('readDDLog',[\App\Http\Controllers\DingTalkRollBackController::class,'readDingTalkRollBackLog']);
// 旧版钉钉审批
// 钉钉审核模板
// 新增钉钉审核模板
Route::post('dingTalkApprovalTemp',[\App\Http\Controllers\Approval\OldDingTalkApprovalTemplateController::class,'addOldDingTalkApprovalTemp']);
// 获取钉钉审核模板详情
Route::get('dingTalkApprovalTemp/{dingTalkApprovalTempId}',[\App\Http\Controllers\Approval\OldDingTalkApprovalTemplateController::class,'getOldDingTalkApprovalTempInfo']);
// 获取钉钉
Route::get('dingTalkApprovalTempSelect/{dingTalkApprovalTempSelectType}',[\App\Http\Controllers\Approval\OldDingTalkApprovalTemplateController::class,'getOldDingTalkApprovalTempSelect']);
// 获取钉钉审核列表
Route::get('dingTalkApprovalTempList',[\App\Http\Controllers\Approval\OldDingTalkApprovalTemplateController::class,'getOldDingTalkApprovalTempList']);
// 删除钉钉审核
Route::patch('dingTalkApprovalTemp/{dingTalkApprovalTempId}',[\App\Http\Controllers\Approval\OldDingTalkApprovalTemplateController::class,'delOldDingTalkApprovalTemp']);

// 数据字典
Route::get('dictionary/{dictionaryIds}',[\App\Http\Controllers\Dictionary\DictionaryController::class,'getDictionaryNextByDictionaryIds']);
Route::get('dictionary',[\App\Http\Controllers\Dictionary\DictionaryController::class,'getDictionaryAllDictionary']);
Route::post('dictionary',[\App\Http\Controllers\Dictionary\DictionaryController::class,'addDictionary']);
Route::put('dictionary/{dictionaryId}',[\App\Http\Controllers\Dictionary\DictionaryController::class,'editDictionary']);
Route::patch('dictionary/{dictionaryId}',[\App\Http\Controllers\Dictionary\DictionaryController::class,'deleteDictionary']);

// 获取自己的登录日志
Route::get("getCurrentStaffLoginLog",[\App\Http\Controllers\Login\LoginController::class,'loginStaffLog']);


// 演示用审批
// 送审信用客户
//Route::post("approvalClientJoinCredit/{creditClientId}",[\App\Http\Controllers\YsApproval\YsApprovalController::class,'YsApprovalClientSend']);

// 工作台
Route::get("selfApprovalNumber",[\App\Http\Controllers\Workbench\WorkbenchController::class,'getApprovalPendingNumber']);
Route::get("selfAgendaList",[\App\Http\Controllers\Workbench\WorkbenchController::class,'getSelfAgendaList']);
// 我的日程
Route::get("selfContractCalendar",[\App\Http\Controllers\Workbench\WorkbenchController::class,'getSelfContractCalendar']);

// 获取钉钉送审部门
Route::get('dingTalkApprovalDepartmentSelect',[\App\Http\Controllers\Department\DepartmentController::class,'getDingTalkApprovalDepartmentList']);
//Route::any('tt',[\App\Http\Controllers\Company\TestController::class,'tt']);
// 文件详情
Route::get('fileInfo/{fileId}',[\App\Http\Controllers\FileController::class,'getFileInfo']);
// 自定义配置
Route::post('setCustomSystemConfig',[\App\Http\Controllers\Config\SystemConfigController::class,'setSystemConfig']);
Route::get('getCustomSystemConfig',[\App\Http\Controllers\Config\SystemConfigController::class,'getSystemConfig']);


/**
 *  委托方
 *
 */
// 新增委托方
Route::post('client',[\App\Http\Controllers\MeClient\MeClientController::class,'addMeClient']);
// 编辑委托方
Route::put('client/{clientId}',[\App\Http\Controllers\MeClient\MeClientController::class,'editMeClient']);
// 删除委托方
Route::patch('client/{clientId}',[\App\Http\Controllers\MeClient\MeClientController::class,'delMeClient']);
// 获取委托方列表
Route::get('client',[\App\Http\Controllers\MeClient\MeClientController::class,'getMeClientList']);
// 获取委托方详情
Route::get('client/{clientId}',[\App\Http\Controllers\MeClient\MeClientController::class,'getMeClientInfoById']);

 
/**
 * 案件
 */
// 绑定调解员
Route::post('bindMediator',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'bindMediator']);
Route::get('mediator',[\App\Http\Controllers\Staff\StaffController::class,'getMediatorList']);
Route::get('mediatorSelect',[\App\Http\Controllers\Staff\MeStaffController::class,'getMeStaffSelect']);
// 外呼人员列表
Route::get('extensionsStaff',[\App\Http\Controllers\Staff\MeStaffController::class,'getExtensionsStaff']);
Route::put('allocateStaffSeat/{staff_id}',[\App\Http\Controllers\Staff\MeStaffController::class,'allocateStaffSeat']);
Route::put('unAllocateStaffSeat/{staff_id}',[\App\Http\Controllers\Staff\MeStaffController::class,'unAllocateStaffSeat']);

// 获取案件状态 迁移至全局
Route::get('lawCaseStatus',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getLawCaseStatusSelect']);
// 新增案件
Route::post('lawCase',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'addLawCase']);
// 编辑案件
Route::put('lawCase/{lawCaseId}',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'editLawCase']);
// 删除案件
Route::patch('lawCase/{lawCaseId}',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'delLawCase']);
// 获取全部案件列表
Route::get('lawCase',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getLawCaseList']);
// 获取律师函列表
Route::get('lawLatter',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getLawCaseLawLatterList']);
//
//Route::get('lawCaseV2',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getLawCaseListV2']);
// 获取委托方案件列表
# --
// 获取案件详情
Route::get('lawCase/{lawCaseId}',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getLawCaseInfoV2']);
Route::get('lawCaseV2/{lawCaseId}',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getLawCaseInfoV2']);

Route::get('selfLawCaseList',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getSelfLawCaseList']);
// 获取话务员列表
Route::get('selfHwyLawCaseList',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getSelfWhLawCaseList']);

// 外呼管理
Route::get('extensions',[\App\Http\Controllers\MeOutboundSystem\MeOutboundSystemController::class,'getExtensions']);
// 话单详情
Route::get('meCdrsDetails/{uuid}',[\App\Http\Controllers\MeOutboundSystem\MeOutboundSystemController::class,'getMeCdrsDetailsByUUid']);
// 话单列表
Route::get('meCdrsList',[\App\Http\Controllers\MeOutboundSystem\MeOutboundSystemController::class,'getMeCdrsList']);
// 回调接受地址
Route::post('meCallBack',[\App\Http\Controllers\MeOutboundSystem\MeOutboundSystemController::class,'meCallBack']);
// 外呼
Route::post('meSendCall',[\App\Http\Controllers\MeOutboundSystem\MeOutboundSystemController::class,'sendCall']);
Route::get('whLawCaseList',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getWhSelfLawCaseList']);
// 回调注册地址
Route::post('registerCallBack',[\App\Http\Controllers\MeOutboundSystem\MeOutboundSystemController::class,'registerCallBack']);
// 首次绑定话务ID和案件
Route::post('lawCaseBindMeDetail',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'lawCaseBindMeDetail']);
// 设置话单备注
Route::post('lawCaseBindMeDetailRemark/{law_case_bind_details_id}',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'lawCaseBindMeDetailRemark']);
// 二次绑定话务状态和备注
Route::post('lawCaseWhFollow/{law_case_id}',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'lawCaseWhFollow']);
// 调解员移交外呼
Route::post('mediatorGoExtensions',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'mediatorGoExtensions']);
// 话务调解to调解员调解
Route::post('extensionsGoMediator/{lawCaseId}',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'extensionsGoMediator']);

// 调解员
// 获取调解员正式受理列表
Route::get('selfMediateDealing',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getMeMediatorAcceptList']);
// 调解员正式受理调解
Route::post('acceptMediator ',[\App\Http\Controllers\MeMediator\MeMediatorController::class,'acceptMediator']);

// 添加会议纪要
Route::post('mediatorMinutesOfMeeting/{lawCaseId}',[\App\Http\Controllers\MeMediator\MeMediatorController::class,'addMediatorMinutesOfMeeting']);
Route::post('callbackMediator/{lawCaseId}',[\App\Http\Controllers\MeMediator\MeMediatorController::class,'addMediatorCallback']);

// 手机号
Route::post('respondentPhone',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'addLawCaseRespondentPhone']);
Route::put('respondentPhone/{law_case_phone_id}',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'editLawCaseRespondentPhone']);
Route::get('respondentPhone/{law_case_phone_id}',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'getLawCaseRespondentPhone']);
// 留言板
Route::post('board/{lawCaseId}',[\App\Http\Controllers\MeLawCase\MeLawCaseBoardController::class,'addBoard']);
Route::get('board',[\App\Http\Controllers\MeLawCase\MeLawCaseBoardController::class,'getBoardByLawCase']);


// SMS
Route::post('smsSendTest',[\App\Http\Controllers\MeSms\MeSMSController::class,'sendSMS']);
Route::post('smsSendOne',[\App\Http\Controllers\MeSms\MeSMSController::class,'sendSMS']);
Route::post('smsSendAll',[\App\Http\Controllers\MeSms\MeSMSController::class,'sendSMS']);
Route::get('smsTemp',[\App\Http\Controllers\MeSms\MeSMSController::class,'getSmsTemp']);
Route::post('smsTemp',[\App\Http\Controllers\MeSms\MeSMSController::class,'addSmsTemp']);
Route::get('smsUpstreamV1',[\App\Http\Controllers\MeSms\MeSMSController::class,'getUpstream']);
Route::get('smsUpstream',[\App\Tools\QxwgSMS\QxwgController::class,'upstream']);

// 话术
Route::post('verbalTrick',[\App\Http\Controllers\MeMediator\MeMediatorVerbalTrickController::class,'addVerbalTrick']);
Route::get('verbalTrick',[\App\Http\Controllers\MeMediator\MeMediatorVerbalTrickController::class,'getVerbalTrick']);
Route::get('verbalTrick/{vt_id}',[\App\Http\Controllers\MeMediator\MeMediatorVerbalTrickController::class,'getVerbalTrickInfo']);
Route::put('verbalTrick/{vt_id}',[\App\Http\Controllers\MeMediator\MeMediatorVerbalTrickController::class,'editVerbalTrick']);
Route::patch('verbalTrick/{vt_id}',[\App\Http\Controllers\MeMediator\MeMediatorVerbalTrickController::class,'deleteVerbalTrick']);

// 诉讼
// 进入诉讼
Route::post('toLawsuit/{lawCaseId}',[\App\Http\Controllers\MeMediator\MeMediatorController::class,'toLawsuit']);
Route::post('lawsuitRecord',[\App\Http\Controllers\MeLawsuit\MeLawsuitRecordController::class,'addLawsuitRecord']);
Route::put('lawsuitRecord/{lawsuitRecordId}',[\App\Http\Controllers\MeLawsuit\MeLawsuitRecordController::class,'editLawsuitRecord']);
Route::get('lawsuitRecord/{lawsuitRecordId}',[\App\Http\Controllers\MeLawsuit\MeLawsuitRecordController::class,'getLawsuitRecordById']);
Route::get('lawsuitRecord',[\App\Http\Controllers\MeLawsuit\MeLawsuitRecordController::class,'getLawsuitRecordByList']);

// 结案
Route::post('toOverClosure/{lawCaseId}',[\App\Http\Controllers\MeMediator\MeMediatorController::class,'toOverClosure']);
// 结案未回款
Route::post('toOverClosureNoMoney/{lawCaseId}',[\App\Http\Controllers\MeMediator\MeMediatorController::class,'toOverClosureNoMoney']);

// 确认导入
Route::post('checkExcel',[\App\Http\Controllers\Import\ImportController::class,'checkExcel']);

// 生成调解函
Route::post('generateMediationAgreement',[\App\Http\Controllers\MeMediator\MeMediatorAgreementController::class,'setMeMediatorAgreementTemplate']);

// 发律师函
Route::post('pushLetter',[\App\Http\Controllers\MeMediator\MeMediationLetterController::class,'pushLawCaseToLetter']);

// 获取短信列表
Route::get('meSmsTemp',[\App\Http\Controllers\SMS\SmsController::class,'getSMSTempSelect']);

// 案件分配详情
Route::post('lawCaseAllocationPreview',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'lawCaseAllocationInfo']);
Route::post('lawCaseAllocation',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'lawCaseAllocation']);
Route::post('lawCaseCancelAllocation',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'lawCaseCancelAllocation']);

// 配置委托方函件
Route::put('meClientLetter/{clientId}',[\App\Http\Controllers\MeClient\MeClientController::class,'setMeClientLatter']);
Route::get('meClientLetter/{clientId}',[\App\Http\Controllers\MeClient\MeClientController::class,'getMeClientLatter']);

############################# V2
Route::post('getPukey',[\App\Http\Controllers\Login\LoginV2Controller::class,'getLoginPuKey']);

Route::post('acceptance',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'acceptance']);
Route::post('refundAcceptance',[\App\Http\Controllers\MeLawCase\MeLawCaseController::class,'refundAcceptance']);

Route::post('updateStatus',[\App\Http\Controllers\MeMediator\MeMediationLetterController::class,'updateStatus']);
Route::get('paperTaskList',[\App\Http\Controllers\MeMediator\MeMediationLetterController::class,'paperTaskList']);
Route::post('checkerPaperLetter/{send_letter_cache_id}',[\App\Http\Controllers\MeMediator\MeMediationLetterController::class,'checkerPaperLetter']);
Route::any('downPaperLetter/{send_letter_cache_id}',[\App\Http\Controllers\MeMediator\MeMediationLetterController::class,'downPaperLetter']);

Route::get('reportFormBySMS/{type}',[\App\Http\Controllers\ReportForms\ReportFormsController::class,'getReportFormBySMS']);
Route::get('reportFormsByPhone/{type}',[\App\Http\Controllers\ReportForms\ReportFormsController::class,'getReportFormsByPhone']);

Route::post('importCaseV2/{clientId}',[\App\Http\Controllers\Import\ImportController::class,'importCaseV2']);
Route::post('checkProgress',[\App\Http\Controllers\Import\ImportController::class,'checkProgress']);


Route::prefix('v2')->group(function () {
    Route::post('login',[\App\Http\Controllers\Login\LoginV2Controller::class,'login']);
    Route::post('switchStaffLogin',[\App\Http\Controllers\Login\LoginV2Controller::class,'switchStaffLogin']);
    Route::post('staffDepartmentSelect',[\App\Http\Controllers\Department\DepartmentController::class,'getStaffDepartmentList']);
});

Route::any('sipCallBack',function (){
    echo "1";
});





